#include <bits/stdc++.h>
using namespace std;
const int maxn = 100+5;
bool G[maxn][maxn];
int c[maxn];
int ans[maxn], t, N, M;

bool topo(int u){
    c[u] = -1;
    for (int v = 1; v <= N; ++v) {
        if(G[u][v]){
            if(c[v] == -1) return false;
            else if(!c[v] && !topo(v)) return false;
        }
    }
    c[u] = 1; ans[--t] = u;
    return true;
}

bool topoSort(){
    for (int v = 1; v <= N; ++v) {
        if(!c[v] && !topo(v)) return false;
    }
    return true;
}

int main() {
    ios_base::sync_with_stdio(false);cin.tie(nullptr);
    while(cin >> N >> M && !(!N && !M)){
        memset(G, false, sizeof(G));
        memset(ans, 0, sizeof(ans));
        memset(c, 0, sizeof(c));
        t = N+1;
        for (int i = 0; i < M; ++i) {
            int a, b; cin >> a >> b;
            G[a][b] = true;
        }
        if (topoSort()){
            for (int i = 1; i <= N; ++i) {
                if(i!=1) cout << " ";
                cout << ans[i];
            }
            cout << '\n';
        }

    }
    return 0;
}